import java.util.Random;
import java.util.Scanner;

public class Test {
    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);

        //生成随机数
        Random random = new Random();
        int randNum = random.nextInt (10100);//0-100

        while (true) {
            System.out.println("请输入你要猜的数字：");
            int n = scanner.nextInt();
            if(n > randNum) {
                System.out.println("猜大了");
            }
            else if(n == randNum) {
                System.out.println("恭喜你猜对了");
            }
            else{
                System.out.println("猜小了");
            }
        }
    }
}
